home *** CD-ROM | disk | FTP | other *** search
/ One Click 21 (Special) / OC021.iso / Juegos / King of Skeleton / King of Skeleton.swf / scripts / DefineSprite_471 / frame_1 / DoAction.as < prev   
Encoding:
Text File  |  2006-02-02  |  409 b   |  22 lines

  1. function setupLeaf(t)
  2. {
  3.    t.xVel = Math.random() * (leafWidth * 0.5);
  4.    t.yVel = leafHeight;
  5.    t.gotoAndPlay(11 + Math.floor(Math.random() * 3));
  6. }
  7. function doLeaf(t)
  8. {
  9.    t.xVel * 0;
  10.    t._x -= t.xVel;
  11.    t.yVel += leafGravity;
  12.    if(t.yVel > leafMaxGrav)
  13.    {
  14.       t.yVel = leafMaxGrav;
  15.    }
  16.    t._y += t.yVel;
  17. }
  18. leafHeight = 0.1;
  19. leafWidth = 5;
  20. leafGravity = 2;
  21. leafMaxGrav = 1.5;
  22.